package com.lyx.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lyx.entity.AirQualityIndex;
import com.lyx.mapper.AirQualityIndexMapper;
import com.lyx.service.AirQualityIndexService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author lyx
 * @since 2022-02-22
 */
@Service
public class AirQualityIndexServiceImpl extends ServiceImpl<AirQualityIndexMapper, AirQualityIndex> implements AirQualityIndexService {
    @Override
  public  Page<AirQualityIndex> pageSelectAir(Page<AirQualityIndex> page, Integer did){
        List<AirQualityIndex> airQualityIndices = this.baseMapper.pageSelectAir(page,did);
        page.setRecords(airQualityIndices);
        return page;
    }

    @Override
    public int addAir(AirQualityIndex air) {
        return this.baseMapper.addAir(air);
    }
}
